package com.winbomb.kingcard.framework.impl;

import com.winbomb.kingcard.framework.Input.TouchEvent;

public class TouchArea {

	private int x;
	private int y;
	private int width;
	private int height;

	public TouchArea(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
	}

	public boolean isBound(TouchEvent event) {
		if (event.x > x && event.x < x + width - 1 && event.y > y && event.y < y + height - 1) {
			return true;
		} else {
			return false;
		}
	}

}